package com.avic.modules.login.service;

import com.avic.common.service.BaseService;
import com.avic.modules.login.domain.LoginLog;
import com.avic.modules.login.service.dto.LoginLogDto;
import com.avic.modules.login.service.dto.LoginLogQueryCriteria;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface LoginLogService extends BaseService<LoginLog> {

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map
    <String,Object>
     */
    Map<String,Object> queryAll(LoginLogQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List
    <AlarmRecordDto>
     */
    List<LoginLog> queryAll(LoginLogQueryCriteria criteria);

    List<LoginLog> queryAllS(LoginLogQueryCriteria criteria,Pageable pageable);

    /**
     * 添加登录日志
     * @param
     * @return
     */
    void addSave(HttpServletRequest request);

    /**
     * 导出数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<LoginLogDto> all, HttpServletResponse response) throws IOException;

    /**
     * 修改登录日志
     */
    void updateSave(HttpServletRequest request);

}
